/**
 * 
 */
package com.asset.crm.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.FlexTable;
/**
 * @author Bosy
 *
 */
public class ItemTables extends Composite implements HasText  {

	private static ItemTablesUiBinder uiBinder = GWT
			.create(ItemTablesUiBinder.class);

	interface ItemTablesUiBinder extends UiBinder<Widget, ItemTables>  {
	}

	/**
	 * Because this class has a default constructor, it can
	 * be used as a binder template. In other words, it can be used in other
	 * *.ui.xml files as follows:
	 * <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
	 *   xmlns:g="urn:import:**user's package**">
	 *  <g:**UserClassName**>Hello!</g:**UserClassName>
	 * </ui:UiBinder>
	 * Note that depending on the widget that is used, it may be necessary to
	 * implement HasHTML instead of HasText.
	 */
	public ItemTables() {
		initWidget(uiBinder.createAndBindUi(this));
	}
	
	@UiField(provided=true)
	FlexTable flexTable;

	public ItemTables(String firstName) {
		setupTable();
		initWidget(uiBinder.createAndBindUi(this));

		// Can access @UiField after calling createAndBindUi
	}

	
	
    private void setupTable(){
    	flexTable = new FlexTable();
//    	flexTable.setText(0, 0, "Product");
        flexTable.setWidth("32em");
        flexTable.setCellSpacing(5);
        flexTable.setCellPadding(3);
//    	flexTable.setBorderWidth(width)
        flexTable.setWidget(0, 0,new Label("Product"));
    	flexTable.setWidget(0, 1, new Label("Code"));
    	flexTable.setWidget(0, 2, new Label("Discount %"));
    	flexTable.setWidget(0, 3, new Label("Unit Price"));
    	flexTable.setWidget(0, 4, new Label("Quantity"));
    	flexTable.setWidget(0, 5, new Label("Tax"));
    	flexTable.setWidget(0, 6, new Label("Tax"));
    	flexTable.setWidget(0, 7, new Label("Line Total"));
    	
    	//flexTable.insertRow(1);
    	
    }



	@Override
	public String getText() {
		// TODO Auto-generated method stub
		return null;
	}



	@Override
	public void setText(String text) {
		// TODO Auto-generated method stub
		
	}


	/**
	 * Gets invoked when the default constructor is called
	 * and a string is provided in the ui.xml file.
	 */

}
